package com.designpatterns.factory.simplefactory;

import com.designpatterns.factory.CMSSoft;
import com.designpatterns.factory.Soft;
import com.designpatterns.factory.OASoft;

/**
 * @author Tinu 1810989@qq.com
 */
public class SimpleFactory {

    public static Soft create(String softName) {
        if ("CMS".equals(softName)) {
            return new CMSSoft();
        } else if ("OA".equals(softName)) {
            return new OASoft();
        } else {
            return new Soft();
        }
    }
}
